import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'Home',
    meta: {
        footShow: true
    },
    component: Home,
},

{
    path: '/homeListaction',
    name: 'homeListaction',
    component: () =>
        import('../views/home/Listaction.vue')
},
{
    path: '/brandDetail/:id',
    name: 'brandDetail',
    component: () =>
        import('../views/brand/brandDetail.vue')
},
{
    path: '/newsGoods',
    name: 'newsGoods',
    component: () =>
        import('../views/newsgoods/index.vue')
},
{
    path: '/topic',
    name: 'topic',
    meta: {
        footShow: true
    },
    component: () =>
        import('../views/topic/index.vue'),
},
{
    path: '/topic/detail/:id',
    name: 'topicDetail',
    component: () =>
        import('../views/topic/detail/index.vue')
},
{
    path: '/category',
    name: 'kind',
    meta: {
        footShow: true
    },
    component: () =>
        import('../views/category/index.vue')
},
{
    path: '/categoryList/:id',
    name: 'categoryList',
    component: () =>
        import('../views/category/Detail.vue')
},
{
    path: '/goods/:id',
    name: 'goods',
    component: () =>
        import('../views/goods/index.vue')
},
{
    path: '/car',
    name: 'car',
    meta: {
        footShow: true
    },
    component: () =>
        import('../views/car/index.vue')
},
{
    path: '/order',
    name: 'orderDetail',
    component: () =>
        import('../views/order/index.vue')
},
{
    path: '/mine',
    name: 'mine',
    meta: {
        footShow: true
    },
    component: () =>
        import('../views/mine/index.vue')
},
{
    path: '/mine/collection',
    name: 'collection',
    component: () =>
        import('../views/mine/collection/index.vue')
},
{
    path: '/mine/feedback',
    name: 'feedback',
    component: () =>
        import('../views/mine/feedback/index.vue')
},
{
    path: '/mine/address',
    name: 'address',
    component: () =>
        import('../views/mine/address/index.vue')
},
{
    path: '/mine/address/detail',
    name: 'addressDetail',
    component: () =>
        import('../views/mine/address/Detail.vue')
},
{
    path: '/mine/address/detail/:id',
    name: 'addressInfoDetail',
    component: () =>
        import('../views/mine/address/Detail.vue')
},
{
    path: '/search',
    name: 'productSearch',
    component: () =>
        import('../views/search/index.vue')

},
{
    path: '/map',
    name: 'map',
    component: () =>
        import('../views/map/index.vue')
}


]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router